package com.ruoyi.system.service.impl;

import com.ruoyi.system.mapper.StoryMapper;
import com.ruoyi.system.service.ImageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class ImageServiceImpl implements ImageService {
    @Autowired
    private StoryMapper storyMapper;

//    @Autowired
//    private FdfsConfig fdfsConfig;



    public String getHeadImgUrl(int storyId){
        String picUrl = storyMapper.getHeadImgUrlByStoryIdAndStudentId(storyId);
        if (picUrl == null && picUrl.isEmpty()){
            return "fail";
        }else {
            return picUrl;
        }
    }
}